

    \filetitle{get}{Query model object properties}{model/get}

	\paragraph{Syntax}

\begin{verbatim}
Ans = get(M,Query)
[Ans,Ans,...] = get(M,Query,Query,...)
\end{verbatim}

\paragraph{Input arguments}

\begin{itemize}
\item
  \texttt{M} {[} model {]} - Model object.
\item
  \texttt{Query} {[} char {]} - Query to the model object.
\end{itemize}

\paragraph{Output arguments}

\begin{itemize}
\tightlist
\item
  \texttt{Ans} {[} \ldots{} {]} - Answer to the query.
\end{itemize}

\paragraph{Valid queries to model
objects}

This is the categorised list of queries to model objects. Note that
letter \texttt{\textquotesingle{}y\textquotesingle{}} is used in various
contexts to denote measurement variables or equations,
\texttt{\textquotesingle{}x\textquotesingle{}} transition variables or
equations, \texttt{\textquotesingle{}e\textquotesingle{}} shocks,
\texttt{\textquotesingle{}p\textquotesingle{}} parameters,
\texttt{\textquotesingle{}g\textquotesingle{}} exogenous variables,
\texttt{\textquotesingle{}d\textquotesingle{}} deterministic trend
equations, and \texttt{\textquotesingle{}l\textquotesingle{}} dynamic
links. The property names are case insensitive.

\subparagraph{Steady state}

\begin{itemize}
\item
  \texttt{\textquotesingle{}sstate\textquotesingle{}} -- Returns {[}
  struct {]} a database with the steady states for all model variables.
  The steady states are described by complex numbers in which the real
  part is the level and the imaginary part is the growth rate.
\item
  \texttt{\textquotesingle{}sstateLevel\textquotesingle{}} -- Returns
  {[} struct {]} a database with the steady-state levels for all model
  variables.
\item
  \texttt{\textquotesingle{}sstateGrowth\textquotesingle{}} -- Returns
  {[} struct {]} a database with steady-state growth (first difference
  for linearised variables, gross rate of growth for log-linearised
  variables) for all model variables.
\item
  \texttt{\textquotesingle{}dtrends\textquotesingle{}} -- Returns {[}
  struct {]} a database with the effect of the deterministic trends on
  the measurement variables. The effect is described by complex numbers
  the same way as the steady state.
\item
  \texttt{\textquotesingle{}dtrendsLevel\textquotesingle{}} -- Returns
  {[} struct {]} a database with the effect of the deterministic trends
  on the steady-state levels of the measurement variables.
\item
  \texttt{\textquotesingle{}dtrendsGrowth\textquotesingle{}} -- Returns
  {[} struct {]} a database with the effect of deterministic trends on
  steady-state growth of the measurement variables.
\item
  \texttt{\textquotesingle{}sstate+dtrends\textquotesingle{}} -- Returns
  {[} struct {]} the same as `sstate' except that the measurement
  variables are corrected for the effect of the deterministic trends.
\item
  \texttt{\textquotesingle{}sstateLevel+dtrendsLevel\textquotesingle{}}
  -- Returns {[} struct {]} the same as `sstateLevel' except that the
  measurement variables are corrected for the effect of the
  deterministic trends.
\item
  \texttt{\textquotesingle{}sstateGrowth+dtrendsGrowth\textquotesingle{}}
  -- Returns {[} struct {]} the same as
  \texttt{\textquotesingle{}sstateGrowth\textquotesingle{}} except that
  the measurement variables are corrected for the effect of the
  deterministic trends.
\end{itemize}

\subparagraph{Variables, shocks, and
parameters}

\begin{itemize}
\item
  \texttt{\textquotesingle{}yList\textquotesingle{}},
  \texttt{\textquotesingle{}xList\textquotesingle{}},
  \texttt{\textquotesingle{}eList\textquotesingle{}},
  \texttt{\textquotesingle{}pList\textquotesingle{}},
  \texttt{\textquotesingle{}gList\textquotesingle{}} - Return {[}
  cellstr {]} the lists of, respectively, measurement variables
  (\texttt{y}), transition variables (\texttt{x}), shocks (\texttt{e}),
  parameters (\texttt{p}), and exogenous variables (\texttt{g}), each in
  order of appearance of the names in declaration sections of the
  original model file. Note that the list of parameters,
  \texttt{\textquotesingle{}pList\textquotesingle{}}, does not include
  the names of std deviations or cross-correlations.
\item
  \texttt{\textquotesingle{}eyList\textquotesingle{}} -- Returns {[}
  cellstr {]} the list of measurement shocks in order of their
  appearance in the model code declarations; only those shocks that
  actually occur in at least one measurement equation are returned.
\item
  \texttt{\textquotesingle{}exList\textquotesingle{}} -- Returns {[}
  cellstr {]} the list of transition shocks in order of their appearance
  in the model code declarations; only those shocks that actually occur
  in at least one transition equation are returned.
\item
  \texttt{\textquotesingle{}stdList\textquotesingle{}} -- Returns {[}
  cellstr {]} the list of the names of the standard deviations for the
  shocks in order of the appearance of the corresponding shocks in the
  model code.
\item
  \texttt{\textquotesingle{}corrList\textquotesingle{}} -- Returns {[}
  cellstr {]} the list of the names of cross-correlation coefficients
  for the shocks in order of the appearance of the corresponding shocks
  in the model code.
\item
  \texttt{\textquotesingle{}stdCorrList\textquotesingle{}} -- Returns
  {[} cellstr {]} the list of the names of std deviations and
  cross-correlation coefficients for the shocks in order of the
  appearance of the corresponding shocks in the model code.
\end{itemize}

\subparagraph{Equations}

\begin{itemize}
\item
  \texttt{\textquotesingle{}yEqtn\textquotesingle{}},
  \texttt{\textquotesingle{}xEqtn\textquotesingle{}},
  \texttt{\textquotesingle{}dEqtn\textquotesingle{}},
  \texttt{\textquotesingle{}lEqtn\textquotesingle{}} - Return {[}
  cellstr {]} the lists of, respectively, to measurement equations
  (\texttt{y}), transition equations (\texttt{x}), deterministic trends
  (\texttt{d}), and dynamic links (\texttt{l}), each in order of
  appearance in the original model file.
\item
  \texttt{\textquotesingle{}links\textquotesingle{}} -- Returns {[}
  struct {]} a database with the dynamic links with fields names after
  the LHS name.
\item
  \texttt{\textquotesingle{}rpteq\textquotesingle{}} -- Returns {[}
  rpteq {]} a reporting equations (rpteq) object (if
  \texttt{!reporting\_equations} were included in the model file).
\end{itemize}

\subparagraph{First-order Taylor expansion of
equations}

\begin{itemize}
\item
  \texttt{\textquotesingle{}derivatives\textquotesingle{}} -- Returns
  {[} cellstr {]} the symbolic/automatic derivatives for each model
  equation; in each equation, the derivatives w.r.t. all variables
  present in that equation are evaluated at once and returned as a
  vector of numbers; see also
  \texttt{\textquotesingle{}wrt\textquotesingle{}}.
\item
  \texttt{\textquotesingle{}wrt\textquotesingle{}} - Returns {[} cellstr
  {]} the list of the variables (and their auxiliary lags or leads) with
  respect to which the corresponding equation in
  \texttt{\textquotesingle{}derivatives\textquotesingle{}} is
  differentiated.
\end{itemize}

\subparagraph{Descriptions and aliases of variables, parameters, and
shocks}

\begin{itemize}
\item
  \texttt{\textquotesingle{}descript\textquotesingle{}} -- Returns {[}
  struct {]} a database with user descriptions of model variables,
  shocks, and parameters.
\item
  \texttt{\textquotesingle{}yDescript\textquotesingle{}},
  \texttt{\textquotesingle{}xDescript\textquotesingle{}},
  \texttt{\textquotesingle{}eDescript\textquotesingle{}},
  \texttt{\textquotesingle{}pDescript\textquotesingle{}},
  \texttt{\textquotesingle{}gDescript\textquotesingle{}} - Return {[}
  cellstr {]} user descriptions of, respectively, measurement variables
  (\texttt{y}), transition variables (\texttt{x}), shocks (\texttt{e}),
  parameters (\texttt{p}), and exogenous variables (\texttt{g}).
\item
  \texttt{\textquotesingle{}alias\textquotesingle{}} -- Returns {[}
  struct {]} a database with all aliases of model variables, shocks, and
  parameters.
\item
  \texttt{\textquotesingle{}yAlias\textquotesingle{}},
  \texttt{\textquotesingle{}xAlias\textquotesingle{}},
  \texttt{\textquotesingle{}eAlias\textquotesingle{}},
  \texttt{\textquotesingle{}pAlias\textquotesingle{}},
  \texttt{\textquotesingle{}gAlias\textquotesingle{}} - Return {[}
  cellstr {]} the aliases of, respectively, measurement variables
  (\texttt{y}), transition variables (\texttt{x}), shocks (\texttt{e}),
  parameters (\texttt{p}), and exogenous variables (\texttt{g}).
\end{itemize}

\subparagraph{Equation labels and
aliases}

\begin{itemize}
\item
  \texttt{\textquotesingle{}labels\textquotesingle{}} -- Returns {[}
  cellstr {]} the list of all user labels added to equations.
\item
  \texttt{\textquotesingle{}yLabels\textquotesingle{}},
  \texttt{\textquotesingle{}xLabels\textquotesingle{}},
  \texttt{\textquotesingle{}dLabels\textquotesingle{}},
  \texttt{\textquotesingle{}lLabels\textquotesingle{}},
  \texttt{\textquotesingle{}rLabels\textquotesingle{}} - Return {[}
  cellstr {]} user labels added, respectively, to measurement equations
  (\texttt{y}), transition equations (\texttt{x}), deterministic trends
  (\texttt{d}), and dynamic links (\texttt{l}).
\item
  \texttt{\textquotesingle{}eqtnAlias\textquotesingle{}} -- Returns {[}
  cellstr {]} the list of all aliases added to equations.
\item
  \texttt{\textquotesingle{}yEqtnAlias\textquotesingle{}},
  \texttt{\textquotesingle{}xEqtnAlias\textquotesingle{}},
  \texttt{\textquotesingle{}dEqtnAlias\textquotesingle{}},
  \texttt{\textquotesingle{}lEqtnAlias\textquotesingle{}},
  \texttt{\textquotesingle{}rEqtnAlias\textquotesingle{}} - Return {[}
  cellstr {]} the aliases of, respectively, measurement equations
  (\texttt{y}), transition equations (\texttt{x}), deterministic trends
  (\texttt{d}), and dynamic links (\texttt{l}).
\end{itemize}

\subparagraph{Parameter values}

\begin{itemize}
\item
  \texttt{\textquotesingle{}corr\textquotesingle{}} -- Returns {[}
  struct {]} a database with current cross-correlation coefficients of
  shocks.
\item
  \texttt{\textquotesingle{}nonzeroCorr\textquotesingle{}} -- Returns
  {[} struct {]} a database with current nonzero cross-correlation
  coefficients of shocks.
\item
  \texttt{\textquotesingle{}parameters\textquotesingle{}} -- Returns {[}
  struct {]} a database with current parameter values, including the std
  devs and non-zero corr coefficients.
\item
  \texttt{\textquotesingle{}std\textquotesingle{}} -- Returns {[} struct
  {]} a database with current std deviations of shocks.
\end{itemize}

\subparagraph{Eigenvalues}

\begin{itemize}
\item
  \texttt{\textquotesingle{}stableRoots\textquotesingle{}} -- Returns
  {[} cell of numeric {]} a vector of the model eigenvalues that are
  smaller than one in magnitude (allowing for rounding errors around
  one).
\item
  \texttt{\textquotesingle{}unitRoots\textquotesingle{}} -- Returns {[}
  cell of numeric {]} a vector of the model eigenvalues that equal one
  in magnitude (allowing for rounding errors around one).
\item
  \texttt{\textquotesingle{}unstableRoots\textquotesingle{}} {[} cell of
  numeric {]} A vector of the model eigenvalues that are greater than
  one in magnitude (allowing for rounding errors around one).
\end{itemize}

\subparagraph{Model structure, solution,
build}

\begin{itemize}
\item
  \texttt{\textquotesingle{}build\textquotesingle{}} -- Returns {[}
  numeric {]} IRIS version number under which the model object has been
  built.
\item
  \texttt{\textquotesingle{}eqtnBlk\textquotesingle{}} -- Returns {[}
  cell {]} of cell str with the recursive block structure of
  steady-state equations (if the block-recursive analysis has already
  been performed).
\item
  \texttt{\textquotesingle{}log\textquotesingle{}} -- Returns {[} struct
  {]} a database with \texttt{true} for each log-linearised variables,
  and \texttt{false} for each linearised variable.
\item
  \texttt{\textquotesingle{}maxLag\textquotesingle{}} -- Returns {[}
  numeric {]} the maximum lag in the model.
\item
  \texttt{\textquotesingle{}maxLead\textquotesingle{}} -- Returns {[}
  numeric {]} the maximum lead in the model.
\item
  \texttt{\textquotesingle{}nameBlk\textquotesingle{}} -- Returns {[}
  cell {]} of cell str with the recursive block structure of variable
  names (if the block-recursive analysis has already been performed).
\item
  \texttt{\textquotesingle{}stationary\textquotesingle{}} -- Returns {[}
  struct {]} a database with \texttt{true} for each stationary
  variables, and \texttt{false} for each unit-root (non-stationary)
  variables (under current solution).
\item
  \texttt{\textquotesingle{}nonStationary\textquotesingle{}} -- Returns
  {[} struct {]} a database with \texttt{true} for each unit-root
  (non-stationary) varible, and \texttt{false} for each stationary
  variable (under current solution).
\item
  \texttt{\textquotesingle{}stationaryList\textquotesingle{}} -- Returns
  {[} cellstr {]} the list of stationary variables (under current
  solution).
\item
  \texttt{\textquotesingle{}nonStationaryList\textquotesingle{}} --
  Returns {[} cellstr {]} cell with the list of unit-root
  (non-stationary) variables (under current solution).
\item
  \texttt{\textquotesingle{}initCond\textquotesingle{}} -- Returns {[}
  cellstr {]} the list of the lagged transition variables that need to
  be supplied as initial conditions in simulations and forecasts. The
  list of the initial conditions is solution-specific as the state-spece
  coefficients at some of the lags may evaluate to zero depending on the
  current parameters.
\item
  \texttt{\textquotesingle{}yVector\textquotesingle{}} -- Returns {[}
  cellstr {]} the list of measurement variables in order of their
  appearance in the rows and columns of state-space matrices
  (effectively identical to
  \texttt{\textquotesingle{}yList\textquotesingle{}}) from the
  \href{model/sspace}{\texttt{model/sspace}} function.
\item
  \texttt{\textquotesingle{}xVector\textquotesingle{}} -- Returns {[}
  cellstr {]} the list of transition variables, and their auxiliary lags
  and leads, in order of their appearance in the rows and columns of
  state-space matrices from the
  \href{model/sspace}{\texttt{model/sspace}} function.
\item
  \texttt{\textquotesingle{}xfVector\textquotesingle{}} -- Returns {[}
  cellstr {]} the list of forward-looking (i.e.~non-predetermined)
  transition variables, and their auxiliary lags and leads, in order of
  their appearance in the rows and columns of state-space matrices from
  the \href{model/sspace}{\texttt{model/sspace}} function.
\item
  \texttt{\textquotesingle{}xbVector\textquotesingle{}} -- Returns {[}
  cellstr {]} the list of backward-looking (i.e.~predetermined)
  transition variables, and their auxiliary lags and leads, in order of
  their appearance in the rows and columns of state-space matrices from
  the \href{model/sspace}{\texttt{model/sspace}} function.
\item
  \texttt{\textquotesingle{}eVector\textquotesingle{}} -- Returns {[}
  cellstr {]} the list of the shocks in order of their appearance in the
  rows and columns of state-space matrices (effectively identical to
  \texttt{\textquotesingle{}eList\textquotesingle{}}) from the
  \href{model/sspace}{\texttt{model/sspace}} function.
\end{itemize}

\paragraph{Description}

\subparagraph{First-order Taylor expansion of
equations}

The expressions for symbolic/automatic derivatives of individual model
equations returned by
\texttt{\textquotesingle{}derivatives\textquotesingle{}} are expressions
that evaluate the derivatives with respect to all variables present in
that equation at once. The list of variables with respect to which each
equation is differentiated is returned by
\texttt{\textquotesingle{}wrt\textquotesingle{}}.

The expressions returned by the query
\texttt{\textquotesingle{}derivatives\textquotesingle{}} can refer to

\begin{itemize}
\tightlist
\item
  the names of model parameters, such as \texttt{alpha};
\item
  the names of transition or measurement variables, such as \texttt{X};
\item
  the lags or leads of variables, such as \texttt{X\{-1\}} or
  \texttt{X\{2\}}.
\end{itemize}

Note that the lags and leads of variables must be, in general, preserved
in the derivatives for non-stationary (unit-root) models. For stationary
models, the lags and leads can be removed and each simply replaced with
the current date of the respective variable.

\paragraph{Example}

\begin{verbatim}
d = get(m,'derivatives');
w = get(m,'wrt');
\end{verbatim}

The 1-by-N cell array \texttt{d} (where N is the total number of
equations in the model) will contain expressions that evaluate to the
vector of derivatives of the individual equations w.r.t. to the
variables present in that equation:

\begin{verbatim}
d{k}
\end{verbatim}

is an expression that returns, in general, a vector of M numbers. These
M numbers are the derivatives of the k-th equation w.r.t to M variables
whose list is in

\begin{verbatim}
w{k}
\end{verbatim}


